import SafariServices
class MyPlugin {
    static func register() {
        FlutterMethodChannel(name: "MyPlugin", binaryMessenger: (((UIApplication.shared.delegate as! AppDelegate).window!!.rootViewController as! UINavigationController).viewControllers[0]) as! FlutterBinaryMessenger).setMethodCallHandler { methodCall, result in
            let arguments = methodCall.arguments as? NSDictionary
            switch methodCall.method {
            case "getMsg":
                result("欢迎使用YFree_App：ios")
            case "goH5":
                yFlutter.yPushVC(storyBoardName: IFinal.StoryBoardName.Main.rawValue, storyBoardIdentifier: IFinal.StoryBoardIdentifier.Main.H5ViewController.rawValue)
            case "goUniapp":
                MiniAppUtils.goMiniApp(viewController: yFlutter, checkVersionJkid: arguments!["checkVersionJkid"] as! String)
            default: result(FlutterMethodNotImplemented)
            }
        }
    }
}
